#include <iostream>
#include <signal.h>
#include <unistd.h>
using namespace std;
void handler(int sig)
{
    cout << "收到了[" << sig << "]号信号" << endl;
    sleep(1);
}
int main()
{
    // int a = 10;
    // signal(SIGFPE, handler);
    // while (true)
    // {
    //     a /= 0;
    //     cout << "Can you see me ?" << endl;
    // }
    int cnt = 5;
    cout << "I am a process, my pid is :" << getpid() << endl;
    while (cnt--)
    {
        sleep(1);
    }
    kill(getpid(), 6);
    return 0;
}